package XieCheng;

import java.util.*;

/**
 * Description：
 * Author: zhangc
 * Date：2017/9/21 19:53
 */
public class Middle {


    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int m = scanner.nextInt();
        int[] ar = new int[ m ];
        for (int j = 0; j < m; j++) {
            ar[ j ] = scanner.nextInt();
        }
        int n = scanner.nextInt();
        int[] arr = new int[ m + n ];
        for (int i = m; i < m + n; i++) {
            arr[ i ] = scanner.nextInt();
        }
        System.arraycopy(ar, 0, arr, 0, m);
        Set<Integer> set = new TreeSet<>();
        for (int i = 0; i < m + n; i++) {
            set.add(arr[ i ]);
        }
        int size = set.size();
        int[] a = new int[ size ];
        Iterator<Integer> iterator = set.iterator();
        int i = 0;
        while (iterator.hasNext()) {
            a[ i++ ] = iterator.next();
        }
        int result = 0;
        int index;
        if (size > 0 && size % 2 == 0) {
            index = size >> 1;
            result = a[ index ] + a[ index - 1 ];
        } else if (size > 0 && size % 2 == 1)
            result = a[ (size + 1) >> 1 ];
        System.out.println(result / 2.0);
    }

}
